/**
 * This code is released under lgpl v3 license.
 * All rights reserved.
*/

package flash.media;

import flash.events.EventDispatcher;
import flash.net.URLRequest;

/**
 *
 * @author yuan yunchang    dukerr@gmail.com
 */
public class Sound extends EventDispatcher{

    protected Sound() {
    }
    public native final static Sound createSound(String bridgeName)/*-{
    return $wnd.FABridge[bridgeName].create("flash.media.Sound");
    }-*/;
    public native final void close()/*-{
    try{
        this.close()
     }catch(e){
     }
    }-*/;
    public native final void load(URLRequest stream)/*-{
    this.load(stream)
    }-*/;
    public native final SoundChannel play(double startTime,int loops)/*-{
    return this.play(startTime,loops)
    }-*/;
    public native final int getBytesLoaded()/*-{
    return this.getBytesLoaded()
    }-*/;
    public native final int getBytesTotal()/*-{
    return this.getBytesTotal()
    }-*/;
    public native final boolean getIsBuffering()/*-{
    return this.getIsBuffering()
    }-*/;
    public native final double getLength()/*-{
    return this.getLength()
    }-*/;
    public native final String getUrl()/*-{
    return this.getUrl()
    }-*/;
    

}
